<template>
  <div class="box">
    <div class="content" v-for="(img,index) in img" :key="index">
      <div class="headline">{{img.name}}</div>
      <div class="showBox" >
        <router-link to="" class="imgBox" v-for="(imgSrc,index) in img.img" :key="index">
          <img :src="imgSrc" alt="" />
        </router-link>
      </div>
    </div>
    
  </div>
</template>

<script>
//chuang
import axios from "axios";

export default {
  name: "FenshowFen",
  data(){
      return{
          img:[]
      }
  },
  created(){
      axios.get("/fenleiZ",
      {
          method:"get"
      }).then((res)=>{
          this.img = res.data;
      }).catch((err)=>{
          console.log("出错了",err);
      })
  }
};
</script>

<style scoped>
.box {
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  margin-top: .4rem;
  margin-bottom: .6rem;
  background: rgb(242, 242, 242);
}
.headline{
    box-sizing: border-box;
    padding: .1rem ;

}
.content{
    width: 100%;
    /* background: white; */
    box-sizing: border-box;
    margin-top: .1rem;
    margin-bottom: .1rem;
}
.showBox{
    width: 100%;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    
}
.imgBox{
    width: 25%;
    flex-shrink: 0;
    background: red;
}
img{
    width: 100%;
}
</style>